package bizlogic;

import java.util.ArrayList;

import model.CompensationLeaveDTO;
import dao.CompensationLeaveDAO1;
import exception.DAOSystemException;
import dao.DAOFactory;

public class CompensationLeaveManager1 {
	private CompensationLeaveDAO1 compensationLeaveDAO;
	public CompensationLeaveManager1() {
		compensationLeaveDAO = DAOFactory.loadInstance().getCompensationLeaveDAO1();
	}
	
	@SuppressWarnings("finally")
	public CompensationLeaveDTO findCompensationLeave(String id){
		CompensationLeaveDTO currentCompensationLeave = new CompensationLeaveDTO();
		try {
			currentCompensationLeave = compensationLeaveDAO.find(id);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} finally
		{
			return currentCompensationLeave;
		}
		
	}
	
	@SuppressWarnings("finally")
	public void updateForApproval(String userid,double total){
		
		try {
			compensationLeaveDAO.updateForApproval(userid,total);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} finally
		{
			
		}
		
	}
   
   
}
